<?

REQUIRE("../../protect/connect_jeu.php");

$query="SELECT V.ville_id,V.ville_proprio,(V.ville_population*(V.ville_tm/100))/(25/M.metier_nbr_tribu) FROM sdville_metier AS M,sdville AS V WHERE M.metier_ville=V.ville_id AND M.metier_batiment=54";
//0=ID, 1=Proprietaire, 2=Taux impot, 3= population
$resultat=mysql_query($query);

WHILE ($element=mysql_fetch_array($resultat)){
      $query="UPDATE sduser_perso SET perso_pame=perso_pame+$element[2] WHERE perso_id=$element[1]";
      $resultat2=mysql_query($query);
}



?>
